<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="MySimpleTag" uri="simpleTags" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/12/9
  Time: 19:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>请求记录</title>
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/index.css" />">
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/public.css" />">
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/reset.css" />">
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/detail.css" />">

<%--    <style>--%>
<%--        footer {--%>
<%--            position: absolute;--%>
<%--            bottom: 0;--%>
<%--            width: 100%;--%>
<%--            line-height: 40px--%>
<%--        }--%>
<%--    </style>--%>
</head>
<body>
<jsp:include page="../banner.jsp">
    <jsp:param name="user" value="${sessionScope.user}"/>
</jsp:include>
<div id="nav">
    <!-- 导航栏版心部分 -->
    <div class="nav_con">
        <ul>
            <li class="margin-left"><a href="../">首页</a></li>
            <li><a href="<c:url value="/book/bookList" />">书目查看</a></li>
            <li><a href="<c:url value="/borrower/currentLendingList" />">当前在借</a></li>
            <li><a href="<c:url value="/borrower/requestList" />" >请求记录</a></li>
            <li><a href="<c:url value="/borrower/historyLendingList" />" >历史记录</a></li>
        </ul>
    </div>
</div>



<h3>借书请求记录</h3>
<div class="bookDiv bookList">
    <div class="bookTitle bookListTitle">当前请求</div>
    <table border="1">
        <tr>
            <th class="bookHeader">流水号</th>
            <th class="bookHeader">书籍名称</th>
            <th class="bookHeader">书籍代码</th>
            <th class="bookHeader">请求状态</th>
            <th class="bookHeader">请求时间</th>
        </tr>
            <c:forEach items="${current}" var="request" varStatus="i">
        <tr>
            <td>${request.id}</td>
            <td>${request.bookName}</td>
            <td>${request.bookCode}</td>
            <td><span style="color: red">未审批</span></td>
            <td><fmt:formatDate value="${request.startTime}" type="both"/></td>
            <td>${request.checkerAccount}</td>
        </tr>
        </c:forEach>
    </table>
</div>


<div class="bookDiv bookList">
    <div class="bookTitle bookListTitle">历史请求</div>
    <table border="1">
        <tr>
            <th class="bookHeader">流水号</th>
            <th class="bookHeader">书籍名称</th>
            <th class="bookHeader">书籍代码</th>
            <th class="bookHeader">请求状态</th>
            <th class="bookHeader">请求时间</th>
            <th class="bookHeader">审查时间</th>
            <th class="bookHeader">审查人</th>

        </tr>
        <c:forEach items="${paginationSupport.items}" var="request" varStatus="i">
            <tr>
                <td>${request.id}</td>
                <td>${request.bookName}</td>
                <td>${request.bookCode}</td>
                <td><MySimpleTag:showRequestStatus status="${request.status}"/></td>
                <td><fmt:formatDate value="${request.startTime}" type="both"/></td>
                <td><fmt:formatDate value="${request.endTime}" type="both"/></td>
                <td>${request.checkerAccount}</td>

            </tr>
        </c:forEach>
    </table>
</div>
每页10个记录，
第${paginationSupport.currentPageNo}/${paginationSupport.totalPageCount}页,共${paginationSupport.totalCount}个记录
<c:if test="${paginationSupport.previousPage}">
    <a href="<c:url value="requestList?pageNo=${paginationSupport.currentPageNo-1}" />">上一页</a>
</c:if>
<c:if test="${paginationSupport.nextPage}">
    <a href="<c:url value="requestList?pageNo=${paginationSupport.currentPageNo+1}" />">下一页</a>
</c:if>



<jsp:include page="../footer.jsp"/>
</body>
</html>
